﻿<%@ Page Language="c#" CodeBehind="onlineperson.aspx.cs" AutoEventWireup="false" Inherits="UDS.SubModule.UnitiveDocument.OnlinePersonPage" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
  <title>在线人员</title>
  <uds:Style runat="server" Href="~/css/BasicLayout.css" />
  <script language="javascript">
  //<!--
		function SendMsg(username,realname)
		{
			window.opener.parent.parent.MainFrame.location='../SM/MsgSend.aspx?SendTo='+username+'&SendToRealName='+realname;
			window.close();
		}
  //-->
  </script>
  <uds:Style runat="server" Href="~/css/BasicLayout.css" />
</head>
<body leftmargin="0" topmargin="0">
  <form method="post" runat="server">
    <table cellspacing="1" cellpadding="1" width="100%" border="0">
      <tr>
        <td background="../../Images/treetopbg.jpg" height="30"><font size="2">在线人数详细</font></td>
      </tr>
      <tr>
        <td>
          <asp:DataGrid ID="dgrd_OnlinePerson" runat="server" Width="100%" AutoGenerateColumns="False" AllowSorting="True" BorderWidth="1px" BorderStyle="None" BorderColor="#93BEE2" class="gbtext" CellPadding="2">
            <HeaderStyle Font-Size="X-Small" Height="24px" BackColor="#E8F4FF"></HeaderStyle>
            <Columns>
              <asp:TemplateColumn HeaderText="姓名">
                <ItemTemplate>
                  <a href="#" onclick='javascript:SendMsg("<%# DataBinder.Eval(Container, "DataItem.Staff_Name") %>","<%# DataBinder.Eval(Container, "DataItem.realname") %>")'><asp:Label runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.realname") %>' /></a>
                </ItemTemplate>
                <EditItemTemplate>
                  <asp:TextBox runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.realname") %>' />
                </EditItemTemplate>
              </asp:TemplateColumn>
              <asp:TemplateColumn SortExpression="LoginTime" HeaderText="登陆时间">
                <ItemTemplate>
                  <asp:Label runat="server" Text='<%# DateTime.Parse(DataBinder.Eval(Container, "DataItem.LoginTime").ToString()).ToShortTimeString() %>' />
                </ItemTemplate>
              </asp:TemplateColumn>
              <asp:TemplateColumn HeaderText="在线时间">
                <ItemTemplate>
                  <%#  GetOnlineTime(DateTime.Parse(DataBinder.Eval(Container.DataItem,"LoginTime").ToString()),DateTime.Parse(DataBinder.Eval(Container.DataItem,"ActiveTime").ToString())).ToString()%>
                </ItemTemplate>
              </asp:TemplateColumn>
              <asp:BoundColumn DataField="IpAddr" HeaderText="IP地址"></asp:BoundColumn>
              <asp:BoundColumn DataField="Position_Name" SortExpression="Position_Name" HeaderText="职位"></asp:BoundColumn>
              <asp:BoundColumn DataField="activeclass" SortExpression="ActiveClass" HeaderText="位置"></asp:BoundColumn>
            </Columns>
          </asp:DataGrid>
        </td>
      </tr>
    </table>
  </form>
</body>
</html>
